<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>扫描结果</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -moz-box-sizing: border-box;
            -webkit-box-sizing: border-box;
            outline: none;
            list-style: none;
        }
        html,body{
            width: 100%;
            height: 100%
        }

        body {
            background-color: #FFFFFF;
            padding-left: 15px;
            padding-top: 15px;
            padding-right: 15px;
            /*display: flex;*/
            flex-flow: column;
            align-items: center;
            justify-content: center;
        }
        body, html {
            margin: 0;
            background-image: url(__IMG__/shareh/bg33.png);
            background-repeat: no-repeat;
            /*padding-top: 10px;*/
            background-color: #f0f0f0;
            overflow: hidden;
            background-size:100% 200px;
        }
        #app {
            width: 100%;
            margin: 0 auto;
            padding-top: 12px;
            margin-top: 40px;
            background-color: #FFF;
            text-align: center;
            /*height:420px;*/
        }
        .zhanweitu {
            /*height:420px;*/

        }
        .zhanweitu > img {
            display: block;
            height:68px;
            width: 68px;
            margin: 0 auto;
            margin-top: 12px;

        }

        .zhanweitu > .word {
            color: rgba(0, 0, 0, 1);
            font-size: 15px;
            font-family: Source Han Sans CN;
            font-weight: 400;
            text-align: center;
            margin-top: 12px;
        }
        .zhanweitu > .word > p {
            font-size:14px;
            color:gray;
            width: 40%;float: left;text-align: left;padding-left: 20px
        }

        .lianjie {
            width: 90%;
            height: 40px;
            line-height: 40px;
            background-color: #EBA000;
            border-radius: 20px;
            margin: 0 auto;
            color: #FFFFFF;
            font-size: 16px;
            text-align: center;
        }

        h1 {
            font-size: 14px;
            color: #ffffff;
            font-family: Source Han Sans CN;
            font-weight: 500;
            position: absolute;
            top: 50%;
            right: 0;
            left:0;
            transform: translateY(-47%);
            text-align: center;

        }

        .bottom_ps {

        }
    </style>
</head>
<body>
<div id="app">
    <div class="zhanweitu">
        {if $data.all_pay && $data.all_pay > 0}
            {if $data.uid}
                <img src="__IMG__/shareh/zhifu/bg3.png" alt="" class="img1" height="70">
        <div style="margin-top: 10px;color: #F5AD19;">支付成功</div>
        <div style="margin-top: 10px;height:40px;line-height:40px;font-size: 16px;">支付金额：<span style="font-size: 18px;font-weight: bold;">{$data.real_pay}元</span></div>
                <div class="word">
                    <p style="">订单金额：</p>
                    <p style="float: right;text-align: right;padding-right: 20px;text-decoration:line-through;">{$data.all_pay}元</p>
                    <div style="clear: both;height: 10px;"></div>
                    <p style="width: 70%;">支分宝扫码支付天天有红包：</p>
                    <p style="width: 25%;float: right;text-align: right;padding-right: 20px;color: red;">{$data.red_give}元</p>
                    <div style="clear: both;height: 10px;"></div>
                    {if $data.give_jifen > 0}
                    <p style="color: red;width: 60%">现金买单积分奖励</p>
                    <p style="width: 30%;float: right;text-align: right;padding-right: 20px;color: red;">{$data.give_jifen} 积分</p>
                    <div style="clear: both;height: 10px;"></div>
                    {/if}
                <!--<p style='font-size:16px;'>支付金额：{$data.real_pay}，赠送积分：{$data.give_jifen}</p>-->
                    <!--<p style='font-size:13px;color:gray;'>订单金额{$data.all_pay}元，由{$data.uname}提供红包<span style="color: red;">{$data.red_give}</span>元！</p>-->
                    <div style="margin-top: 5px;">
                        <img src="{$data.image}" height="100" width="100%" />
                    </div>
                    <p style='font-size:14px;color:gray;text-align: center;width: 100%;line-height: 30px;padding-left: 0;'>{$data.title}</p>
                    {if $shop_id && $shop_id > 0}
                    <wx-open-launch-weapp
                            id="launch-btn"
                            username="gh_213bfa1821ce"
                            path="/pageC/shop/shop?id={$shop_id}">
                        <template>
                            <style>
                                .btn{
                                    background-color: #EBA000; /* Green */
                                    border: none;
                                    color: white;
                                    padding: 10px 20px;
                                    text-align: center;
                                    text-decoration: none;
                                    display: inline-block;
                                    font-size: 16px;
                                    border-radius:5px;
                                    margin-bottom:5px;
                                }
                            </style>
                            <button class="btn">进店逛逛</button>
                            <br/>
                        </template>
                    </wx-open-launch-weapp>
                    {else /}
                    <wx-open-launch-weapp
                            id="launch-btn"
                            username="gh_213bfa1821ce"
                            path="/pageE/myDian/index.html?uid={$data.uid}">
                        <template>
                            <style>
                                .btn{
                                    background-color: #EBA000; /* Green */
                                    border: none;
                                    color: white;
                                    padding: 10px 20px;
                                    text-align: center;
                                    text-decoration: none;
                                    display: inline-block;
                                    font-size: 16px;
                                    border-radius:5px;
                                    margin-bottom:5px;
                                }
                            </style>
                            <button class="btn">进店逛逛</button>
                            <br/>
                        </template>
                    </wx-open-launch-weapp>
                    {/if}
                </div>
            {else /}
                <img src="__IMG__/shareh/zhifu/bg3.png" alt="" class="img1" height="70">
                <div style="margin-top: 10px;color: #F5AD19;">支付成功</div>
                <div style="margin-top: 10px;height:40px;line-height:40px;font-size: 16px;">支付金额：<span style="font-size: 18px;font-weight: bold;">{$data.all_pay}元</span></div>
                {if $data.give_jifen > 0}
                <p style="color: red;width: 100%">现金买单积分奖励：{$data.give_jifen} 积分</p>
                <div style="clear: both;height: 10px;"></div>
                {/if}
                <div style="margin-top: 5px;">
                    <img src="{$configImg}" height="200" width="100%">
                </div>
        {/if}
        {else /}
            <img src="__IMG__/shareh/zhifu/bg3.png" alt="" class="img1" height="70">
            <div style="margin-top: 10px;color: #F5AD19;">支付成功</div>
            <!--<div style="margin-top: 10px;height:40px;line-height:40px;font-size: 16px;">支付积分：<span style="font-size: 18px;font-weight: bold;">{$data.all_pay}元</span></div>-->
            {if $data.give_jifen > 0}
            <p style="color: red;width: 100%">积分奖励：{$data.give_jifen} 积分</p>
            <div style="clear: both;height: 10px;"></div>
            {/if}
            <div style="margin-top: 5px;">
                <img src="{$configImg}" height="200" width="100%">
            </div>
        {/if}
    </div>
    <div style="clear: both;position: absolute;bottom: 5px;left:0;width: 100%;text-align: center;margin: 0 auto;padding: 0;z-index: 9999;">
        <div class="lianjie" onclick="tz()">
            点击下载APP
        </div>
        <div style="clear: both;height: 2px;"></div>
        <div class="word" style="color: cornflowerblue;font-size: 14px;"  onclick="location.href='https://i.eqxiu.com/s/bBySBkHe?bt=yxy&eqrcode=1&share_level=1&from_user=20200117f955df2620200117f955df26&from_id=84bb3a2e-5754a38d3-d&share_time=1606494424076';">全城商品任意兑，让您爱上积分！</div>
        <div style="clear: both;height: 2px;"></div>
        <!--<div class="bottom_ps" style="color: cornflowerblue;font-size: 15px" onclick="location.href='https://i.eqxiu.com/s/bBySBkHe?bt=yxy&eqrcode=1&share_level=1&from_user=20200117f955df2620200117f955df26&from_id=84bb3a2e-5754a38d3-d&share_time=1606494424076';"><span>全天数据管理有限公司</span></div>-->
    </div>

</div>
</body>
</html>
<input type='hidden' id='uid' value='{$data.uid}' />
<input type='hidden' id='uname' value='{$data.uname}' />
<input type='hidden' id='title' value='{$data.title}' />
<input type='hidden' id='image' value='{$data.image}' />
<input type='hidden' id='real_pay' value='{$data.real_pay}' />
<input type='hidden' id='red_give' value='{$data.red_give}' />
<input type='hidden' id='all_pay' value='{$data.all_pay}' />
<input type='hidden' id='give_jifen' value='{$data.give_jifen}' />
<script type="text/javascript" src="__JS__/jquery.min.js"></script>
<script  src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<script>
    $(function () {
        // config 的参数以及签名=
        var uid = document.getElementById('uid').value;
        var uname = document.getElementById('uname').value;
        var title = document.getElementById('title').value;
        var image = document.getElementById('image').value;
        var real_pay = document.getElementById('real_pay').value;
        var red_give = document.getElementById('red_give').value;
        var all_pay = document.getElementById('all_pay').value;
        var give_jifen = document.getElementById('give_jifen').value;
        $.get('/admin/Test/get_sign?uid=' + uid+'&uname=' + uname+'&title=' + title+'&image=' + image+'&real_pay=' + real_pay+'&red_give=' + red_give+'&all_pay=' + all_pay+'&give_jifen=' + give_jifen, function(response){
            if(response.status == 200) {
                var info = response.msg;
                wx.config({
                    debug: false,
                    appId: info.appId,
                    timestamp: info.timestamp,
                    nonceStr: info.nonceStr,
                    signature: info.signature,
                    jsApiList: ["startRecord", "stopRecord", "onVoiceRecordEnd", "playVoice", "pauseVoice", "stopVoice", "onVoicePlayEnd", "uploadVoice", "downloadVoice", "chooseImage", "previewImage", "uploadImage", "downloadImage", "translateVoice", "getNetworkType", "openLocation", "getLocation"],//必须要不调用小程序标签渲染不出来
                    openTagList: ['wx-open-launch-weapp']//必须必须要不调用小程序标签渲染不出来
                });
            }
            wx.ready(function () {

            });
        });

        var btn = document.getElementById('launch-btn');
        btn.addEventListener('launch', function (e) {
            console.log('success');
        });
        btn.addEventListener('error', function (e) {
            console.log('fail', e.detail);
        });

//=== 获取 config 的参数以及签名=== end


    });
    function tz() {
        if (navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)) {
            var loadDateTime = new Date();
            window.setTimeout(function () {
                var timeOutDateTime = new Date();
                if (timeOutDateTime - loadDateTime < 5000) {
                    window.location = 'itms-apps://itunes.apple.com/cn/app/wei/id1468418168';
                } else {
                    window.close();
                }
            }, 300);
        } else {
            window.setTimeout(function () {
                window.location.href = 'https://csdl.jintianjifen.cn/zhifenbao.apk';
            }, 300);
        }
    }
</script>

